/** 
* @param {array}
* @param {function}
* @returns {void}
**/
function forEach(array, callback) {
  if (!Array.isArray(array)) return
  const len = array.length
  let i = -1

  while (++i < len) {
    callback(array[i], i, array)
  }
}

export default forEach